package com.phkj.qdh.net

import com.phkj.qdh.utils.SPSUtils
import com.phkj.qdh.utils.SPS_TOKEN
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor: Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request().newBuilder()
            .addHeader("USER_TOKEN", SPSUtils.getString(SPS_TOKEN,""))
//            .addHeader("USER_TOKEN","d19120673dcd406a85da8766bc4488a1")
            .build();
        // 开始请求
        return chain.proceed(request);
    }
}